<?php
namespace addons\alioss\admin\controller;

use app\common\AppController;
use app\common\service\ConfigService;
use think\facade\Request;

class Index extends AppController
{
    /**
     * 阿里云上传配置
     */
    public function config()
    {
        if ($this->isAjax())
        {
            $request = Request::param();
            $data = $request['form'];
            ConfigService::setConf('addon_alioss', 'alioss', $data);
            return $this->success();
        }
        $config = ConfigService::getConf('addon_alioss', 'alioss');
        return view('', ['data' => $config]);
    }
}
